package com.xnfh.framework.webcommand

import com.google.auto.service.AutoService
import com.imaker.webview.ICallbackFromMainprocessToWebViewProcessInterface
import com.imaker.webview.command.Command
import com.xnfh.framework.toast.TipsToast

/**
 * @Description:
 * @author ziheng
 * @date 2023/5/17 10:22
 */
@AutoService(Command::class)
class CommandShowToast : Command {
    override fun name(): String {
        return "showToast"
    }

    override fun execute(
        parameters: Map<*, *>?,
        callback: ICallbackFromMainprocessToWebViewProcessInterface?
    ) {
        TipsToast.showTips(parameters?.get("message")?.toString())
    }

}